Filename | (eval 1111)[/usr/share/perl/5.10/CGI.pm:869] |
Statements | Executed 16 statements in 66µs |
Eval Invoked At | /usr/share/perl/5.10/CGI.pm line 869 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 73µs | 321µs | _name_and_path_from_env | CGI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 321µs (73+248) within CGI::_name_and_path_from_env which was called 2 times, avg 161µs/call:
# once (47µs+227µs) by CGI::path_info at line 832 of CGI.pm
# once (26µs+21µs) by CGI::script_name at line 6 of (eval 1113)[CGI.pm:869] | ||||
2 | 2 | 2µs | my $self = shift; | ||
3 | 2 | 4µs | my $script_name = $ENV{SCRIPT_NAME} || ''; | ||
4 | 2 | 2µs | my $path_info = $ENV{PATH_INFO} || ''; | ||
5 | 2 | 16µs | 2 | 199µs | my $uri = $self->request_uri || ''; # spent 196µs making 1 call to CGI::AUTOLOAD
# spent 3µs making 1 call to CGI::request_uri |
6 | |||||
7 | 2 | 12µs | 2 | 2µs | $uri =~ s/\?.*//s; # spent 2µs making 2 calls to CGI::CORE:subst, avg 1µs/call |
8 | 2 | 11µs | 2 | 43µs | $uri = unescape($uri); # spent 43µs making 2 calls to CGI::Util::unescape, avg 22µs/call |
9 | |||||
10 | 2 | 3µs | if ($uri ne "$script_name$path_info") { | ||
11 | my $script_name_pattern = quotemeta($script_name); | ||||
12 | my $path_info_pattern = quotemeta($path_info); | ||||
13 | $script_name_pattern =~ s{(?:\\/)+}{/+}g; | ||||
14 | $path_info_pattern =~ s{(?:\\/)+}{/+}g; | ||||
15 | |||||
16 | if ($uri =~ /^($script_name_pattern)($path_info_pattern)$/s) { | ||||
17 | # REQUEST_URI and SCRIPT_NAME . PATH_INFO only differ by the | ||||
18 | # numer of consecutive slashes, so we can extract the info from | ||||
19 | # REQUEST_URI: | ||||
20 | ($script_name, $path_info) = ($1, $2); | ||||
21 | } | ||||
22 | } | ||||
23 | 2 | 15µs | return ($script_name,$path_info); | ||
24 | } | ||||
25 | |||||
26 | ; |